// import request from "@/utils/request";
// import { createWriteStream } from "fs"

// export const downloadFile = async (url, outputPath) => {
//     const writer = createWriteStream(outputPath);
//     const res = await request.get(url, {
//         method: 'GET',
//         responseType: 'stream'
//     });
//     res.data.pipe(writer);
//     return new Promise((resolve, reject) => {
//         writer.on('finish', () => {
//             resolve;
//         });
//         writer.on('error', reject);
//     });
// }